home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Tools / Win95 Secrets / SETUP.Z / PROCDB.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-19  |  4.9 KB  |  144 lines

  1. //==================================
  2. // WIN32WLK - Matt Pietrek 1995
  3. // FILE: PROCDB.H
  4. //==================================
  5. #pragma pack(1)
  6.  
  7. typedef struct _ENVIRONMENT_DATABASE
  8. {
  9. PSTR    pszEnvironment;     // 00h Pointer to Environment
  10. DWORD   un1;                // 04h
  11. PSTR    pszCmdLine;         // 08h Pointer to command line
  12. PSTR    pszCurrDirectory;   // 0Ch Pointer to current directory
  13. LPSTARTUPINFOA pStartupInfo;// 10h Pointer to STARTUPINFOA struct
  14. HANDLE  hStdIn;             // 14h Standard Input
  15. HANDLE  hStdOut;            // 18h Standard Output
  16. HANDLE  hStdErr;            // 1Ch Standard Error
  17. DWORD   un2;                // 20h
  18. DWORD   InheritConsole;     // 24h
  19. DWORD   BreakType;          // 28h
  20. DWORD   BreakSem;           // 2Ch
  21. DWORD   BreakEvent;         // 30h
  22. DWORD   BreakThreadID;      // 34h
  23. DWORD   BreakHandlers;      // 38h
  24. } ENVIRONMENT_DATABASE, *PENVIRONMENT_DATABASE;
  25.  
  26. typedef struct _HANDLE_TABLE_ENTRY
  27. {
  28.     DWORD   flags;      // Valid flags depend on what type of object this is
  29.     PVOID   pObject;    // Pointer to the object that the handle refers to
  30. } HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
  31.  
  32. typedef struct _HANDLE_TABLE
  33. {
  34.     DWORD   cEntries;               // Max number of handles in table
  35.     HANDLE_TABLE_ENTRY array[1];    // An array (number is given by cEntries)
  36. } HANDLE_TABLE, *PHANDLE_TABLE;
  37.  
  38. typedef struct _PROCESS_DATABASE
  39. {
  40. DWORD   Type;               // 00h KERNEL32 object type (5)
  41.  
  42. DWORD   cReference;         // 04h Number of references to process
  43.  
  44. DWORD   un1;                // 08h
  45.  
  46. DWORD   someEvent;          // 0Ch An event object (What's it used for???)
  47.  
  48. DWORD   TerminationStatus;  // 10h Returned by GetExitCodeProcess
  49.  
  50. DWORD   un2;                // 14h
  51.  
  52. DWORD   DefaultHeap;        // 18h Address of the process heap
  53.  
  54. DWORD   MemoryContext;      // 1Ch pointer to the process's context
  55.  
  56. DWORD   flags;              // 20h
  57.                             // 0x00000001 - fDebugSingle
  58.                             // 0x00000002 - fCreateProcessEvent
  59.                             // 0x00000004 - fExitProcessEvent
  60.                             // 0x00000008 - fWin16Process
  61.                             // 0x00000010 - fDosProcess
  62.                             // 0x00000020 - fConsoleProcess
  63.                             // 0x00000040 - fFileApisAreOem
  64.                             // 0x00000080 - fNukeProcess
  65.                             // 0x00000100 - fServiceProcess
  66.                             // 0x00000800 - fLoginScriptHack
  67.                                 
  68. DWORD   pPSP;               // 24h Linear address of PSP?
  69.  
  70. WORD    PSPSelector;        // 28h
  71.  
  72. WORD    MTEIndex;           // 2Ah
  73.  
  74. WORD    cThreads;           // 2Ch
  75.  
  76. WORD    cNotTermThreads;    // 2Eh
  77.  
  78. WORD    un3;                // 30h
  79.  
  80. WORD    cRing0Threads;      // 32h number of ring 0 threads
  81.  
  82. HANDLE  HeapHandle;         // 34h Heap to allocate handle tables out of
  83.                             //     This seems to always be the KERNEL32 heap
  84.  
  85. HTASK   W16TDB;             // 38h Win16 Task Database selector
  86.  
  87. DWORD   MemMapFiles;        // 3Ch memory mapped file list (?)
  88.  
  89. PENVIRONMENT_DATABASE pEDB; // 40h Pointer to Environment Database
  90.  
  91. PHANDLE_TABLE pHandleTable; // 44h Pointer to process handle table
  92.  
  93. struct _PROCESS_DATABASE * ParentPDB;   // 48h Parent process database
  94.  
  95. PMODREF MODREFlist;         // 4Ch Module reference list
  96.  
  97. DWORD   ThreadList;         // 50h Threads in this process
  98.  
  99. DWORD   DebuggeeCB;         // 54h Debuggee Context block?
  100.  
  101. DWORD   LocalHeapFreeHead;  // 58h Head of free list in process heap
  102.  
  103. DWORD   InitialRing0ID;     // 5Ch
  104.  
  105. CRITICAL_SECTION    crst;   // 60h
  106.  
  107. DWORD   un4[3];             // 78h
  108.  
  109. DWORD   pConsole;           // 84h Pointer to console for process
  110.  
  111. DWORD   tlsInUseBits1;      // 88h  // Represents TLS indices 0 - 31
  112.  
  113. DWORD   tlsInUseBits2;      // 8Ch  // Represents TLS indices 32 - 63
  114.  
  115. DWORD   ProcessDWORD;       // 90h
  116.  
  117. struct _PROCESS_DATABASE * ProcessGroup;    // 94h
  118.  
  119. DWORD   pExeMODREF;         // 98h pointer to EXE's MODREF
  120.  
  121. DWORD   TopExcFilter;       // 9Ch Top Exception Filter?
  122.  
  123. DWORD   BasePriority;       // A0h Base scheduling priority for process
  124.  
  125. DWORD   HeapOwnList;        // A4h Head of the list of process heaps
  126.  
  127. DWORD   HeapHandleBlockList;// A8h Pointer to head of heap handle block list
  128.  
  129. DWORD   pSomeHeapPtr;       // ACh normally zero, but can a pointer to a
  130.                             // moveable handle block in the heap
  131.  
  132. DWORD   pConsoleProvider;   // B0h Process that owns the console we're using?
  133.  
  134. WORD    EnvironSelector;    // B4h Selector containing process environment
  135.  
  136. WORD    ErrorMode;          // B6H SetErrorMode value (also thunks to Win16)
  137.  
  138. DWORD   pevtLoadFinished;   // B8h Pointer to event LoadFinished?
  139.  
  140. WORD    UTState;            // BCh
  141. } PROCESS_DATABASE, *PPROCESS_DATABASE;
  142.  
  143. #pragma pack()
  144.